<template>
  <div class="header">
    <el-carousel indicator-position="outside">
    <el-carousel-item v-for="item of swiperList" :key="item.id">
      <img :src="item.imgUrl" alt="" class="image">
    </el-carousel-item>
  </el-carousel>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperList: [
        {
          'id': '001',
          'imgUrl': require('../../../assets/imgs/home/sliders/bg2.jpg')
        },
        {
          'id': '002',
          'imgUrl': require('../../../assets/imgs/home/sliders/bg2.jpg')
        },
        {
          'id': '003',
          'imgUrl': require('../../../assets/imgs/home/sliders/bg2.jpg')
        },
        {
          'id': '004',
          'imgUrl': require('../../../assets/imgs/home/sliders/bg2.jpg')
        }
      ]
    }
  }
}
</script>

<style lang="scss" scoped>
.header {
  width: 100%;
  height: 300px;
  background-color: palegoldenrod;
  .image {
    width: 2048px;
    height: 300px;
    }
  .el-carousel__item h3 {
    color: #475669;
    font-size: 18px;
    opacity: 0.75;
    line-height: 300px;
    margin: 0;
  }
  .el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
  }
  .el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
  }
}
</style>
